import {BaseEntity, Column, Entity, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany, OneToOne, PrimaryColumn, PrimaryGeneratedColumn, RelationId} from 'typeorm';

@Entity('sys_user', {schema: 'nest-mall' } )
@Index('username', ['username' ], {unique: true})
export class SysUser {

    @PrimaryGeneratedColumn({
        type: 'bigint',
        name: 'user_id',
        })
    userId: string;

    @Column('varchar', {
        nullable: false,
        unique: true,
        length: 50,
        name: 'username',
        })
    username: string;

    @Column('varchar', {
        nullable: true,
        length: 100,
        name: 'password',
        })
    password: string | null;

    @Column('varchar', {
        nullable: true,
        length: 100,
        name: 'email',
        })
    email: string | null;

    @Column('varchar', {
        nullable: true,
        length: 100,
        name: 'mobile',
        })
    mobile: string | null;

    @Column('tinyint', {
        nullable: true,
        name: 'status',
        })
    status: number | null;

    @Column('bigint', {
        nullable: true,
        name: 'create_user_id',
        })
    createUserId: string | null;

    @Column('datetime', {
        nullable: true,
        name: 'create_time',
        })
    createTime: Date | null;

    @Column('bigint', {
        nullable: true,
        name: 'dept_id',
        })
    deptId: string | null;

}
